-- search for SSIS or DTS packages matching a search string. SQL2005 0nly
SET IMPLICIT_TRANSACTIONS OFF
DECLARE @SearchString SYSNAME; SET @SearchString= '%%'  -- <========== EDIT THIS
SELECT 'SSIS' AS [type], @@SERVERNAME AS [server], f.foldername, p.name
  FROM msdb.dbo.sysdtspackages90 p
	INNER JOIN msdb.dbo.sysdtspackagefolders90 f ON (p.folderid = f.folderid)
  WHERE p.[name] LIKE @SearchString
UNION ALL
SELECT DISTINCT 'DTS' AS [type], @@SERVERNAME AS [server], Null,p.name
  FROM msdb.dbo.sysdtspackages p
  WHERE p.[name] LIKE @SearchString
  ORDER BY f.foldername, p.name
GO